package org.amphiprion.montrictracv4.web.model;

import org.amphiprion.apiforanywebsite.annotation.WebElement;
import org.amphiprion.apiforanywebsite.annotation.WebElement.ValueType;

public class WebUserMecanism {
	public String id;

	@WebElement(cssSelector = "th>a")
	public String name;

	// @WebElement(cssSelector = "td>img", valueType = ValueType.ATTRIBUTE, attributeName = "alt")
	@WebElement(cssSelector = "td")
	public String value;

	@WebElement(cssSelector = "th>div>a", valueType = ValueType.ATTRIBUTE, attributeName = "href")
	private void setId(String action) {
		id = action.substring(action.lastIndexOf('/') + 1);
	}

	@Override
	public String toString() {
		return name + " | " + value + " | " + id;
	}
}
